package czk.jvm.lecture.bytecode;

import java.util.Date;

public class MyTest6 {
    public static void main(String[] args) {
        Animal animal=new Animal();
        Animal dog=new Dog();
        animal.test("test");
        dog.test(new Date());
    }
}
class Animal{
    public void test(String string){
        System.out.println("Animal"+"   "+string);
    }
    public void test(Date date){
        System.out.println("animal"+"  "+date);
    }
}
class Dog extends Animal{
    @Override
    public void test(String string) {
        System.out.println("dog"+"  "+string);
    }

    @Override
    public void test(Date date) {
        System.out.println("dog"+"  "+date);
    }
}
